home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_300 / 343_02 / mrw.c < prev    next >
C/C++ Source or Header  |  1990-06-22  |  1KB  |  50 lines

  1.  
  2.        /*****************************************************
  3.        *
  4.        *       file c:\lsu\mrw.c
  5.        *
  6.        *       Functions: This file contains
  7.        *           my_read
  8.        *           my_write
  9.        *
  10.        *       Purpose: These two functions call the Turbo C
  11.        *           functions _read and _write. All software
  12.        *           will use my_read and my_write so that if
  13.        *           the software is ported to another system
  14.        *           that uses read and write changing the
  15.        *           two functions in this file will take care
  16.        *           of the move.
  17.        *
  18.        *       External Call:
  19.        *           read
  20.        *           _write
  21.        *
  22.        *       Modifications:
  23.        *           10 June 1987 - created
  24.        *
  25.        *
  26.        ************************************************************/
  27.  
  28. #include "d:\cips\cips.h"
  29.  
  30. my_read(file_descriptor, buffer, number_of_bytes)
  31.    int  file_descriptor, number_of_bytes;
  32.    char *buffer;
  33. {
  34.    int bytes_read;
  35.    int read();
  36.    bytes_read = read(file_descriptor, buffer, number_of_bytes);
  37.    return(bytes_read);
  38. }
  39.  
  40.  
  41. my_write(file_descriptor, buffer, number_of_bytes)
  42.    int  file_descriptor, number_of_bytes;
  43.    char *buffer;
  44. {
  45.    int bytes_written;
  46.    int write();
  47.    bytes_written = write(file_descriptor, buffer, number_of_bytes);
  48.    return(bytes_written);
  49. }
  50.